home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 46
/
Mobiclic46.iso
/
pc
/
DATA
/
COMMUNS
/
MOBICLIC_MENUS.CST
/
00006_Script_gestion du son
< prev
next >
Wrap
Text File
|
2002-08-21
|
3KB
|
106 lines
-- gestion du son
global dernierSon,nivSon,volumeOn,menusActifs,ouvreVolume, chemin, gFlag_soustitrage
-- dernierSon : nom du dernier son jouΘ
-- nivSon : liste α 3 termes contenant le niveau sonore de chaque piste
-- volumeOn : indique si la fenΩtre de rΘglage du volume est active
-- lecture d'un son
on joueSon nom, n
if the paramCount = 1 then
n = 3
end if
if voidP(nivSon)=1 then
nivSon=[255,255,255]
end if
-- ajout Θventuel de "sons:"
if char 1 to 9 of nom <> "sons" then
if offset(":", nom) = 0 then
nom = "sons:" & nom
end if
end if
dernierSon = nom
--
put the pathName & nomDos(nom) & ".aif" into temp
put " Son jouΘ : " & dernierSon
sound playFile n, temp
-- rΘglage du niveau des autres canaux
repeat with i=1 to 3
if i<>n and nivSon[i]>102 then
sound(i).volume = 110
end if
end repeat
---------------------------------------lancement du sous-titrage pour les sourds------------
if gFlag_soustitrage = 1 then gere_soustitrage(nom)
--------------------------------------------------------------------------------------------
end joueSon
-- jouer un son du cyberCalendrier
on sonCyber son
global gNoABS_cyber
joueson gNoABS_cyber & "_" & son
end
-- rΘglage du volume
on niveauSon
if voidP(nivson) = 1 then
nivson=[255,255,255]
end if
repeat with i=1 to 3
sound(i).volume = nivSon[i]
end repeat
end nivSon
-- affichage de la fenΩtre de rΘglage du volume
on volume
volumeOn=1
-- afficherPistes (value(field "ppgs"))
menusActifs = 0
ouvreVolume=1
-- sprite(value(field "ppgs")).memberNum = member("volumeBD").number
-- sprite(value(field "ppgs")).locH = 320
-- sprite(value(field "ppgs")).locV = 240
-- updateStage
put " Ouverture du rΘglage du volume"
end volume
-- dissimulation de la fenΩtre de rΘglage du volume
on volumeOff
-- masquerPistes (value(field "ppgs"))
-- sprite(value(field "ppgs")).memberNum = member("pointPourGlisserSur").number
menusActifs = 1
volumeOn=0
-- unloadMember member "volumeBD"
put " Fermeture du rΘglage du volume avec les valeurs : " & nivSon
end volumeOff
-- attendre la fin d'un son
on attendreSon p
set T = 1.0/the frameTempo
repeat while soundBusy(p)
updateStage
temporise(T)
end repeat
end
-- dΘsactivation des pistes audio
on coupeSon
repeat with i=1 to the paramCount
if value(param(i))<>0 then
puppetSound (param(i)),0
else
listeSons param(i)
end if
end repeat
end coupeSon
on listeSons chaine
n=offset(">", chaine)
n1=value(char 1 to n-1 of chaine)
n2=value(char n+1 to length(chaine) of chaine)
repeat with j=n1 to n2
puppetSound j,0
end repeat
end listeSons